﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainSite.Master" AutoEventWireup="True" CodeBehind="BSCProgress.aspx.cs" Inherits="BSCMFF.Web.Pages.BSC_Setup.Manager.BSCProgress" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Charting" tagprefix="telerik" %>
<%@ Register Src="~/UserControls/Details/KPIProgressDetails.ascx" TagPrefix="bsc" TagName="KPIProgressDetails" %>


<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" 
        meta:resourcekey="RadAjaxLoadingPanel1Resource1" >
    </telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" 
        LoadingPanelID="RadAjaxLoadingPanel1" HorizontalAlign="NotSet" 
        meta:resourcekey="RadAjaxPanel1Resource1" >
    <div>
            <telerik:RadChart ID="RadChart1" runat="server" DefaultType="Line" Skin="Vista" 
                Height="400px" Width="800px" meta:resourcekey="RadChart1Resource1">
           <Appearance Corners="Round, Round, Round, Round, 7">
                <FillStyle FillType="ComplexGradient">
                    <FillSettings>
                        <ComplexGradient>
                            <telerik:GradientElement Color="243, 253, 255" />
                            <telerik:GradientElement Color="White" Position="0.5" />
                            <telerik:GradientElement Color="243, 253, 255" Position="1" />
                        </ComplexGradient>
                    </FillSettings>
                </FillStyle>
                <Border Color="212, 221, 222" />
            </Appearance>
            <Legend>
                <Appearance Dimensions-Margins="1px, 1%, 10%, 1px">
                    <ItemTextAppearance TextProperties-Color="86, 88, 89">
                    </ItemTextAppearance>
                    <ItemMarkerAppearance Figure="Rectangle">
                    </ItemMarkerAppearance>
                    <FillStyle MainColor="">
                    </FillStyle>
                    <Border Color="" />
                </Appearance>
                <TextBlock>
                    <Appearance Position-AlignedPosition="Top" TextProperties-Color="86, 88, 89">
                    </Appearance>
                </TextBlock>
            </Legend>
            <PlotArea>
                <MarkedZones>
                    <telerik:ChartMarkedZone meta:resourcekey="ChartMarkedZoneResource1" 
                        ValueStartY="-5">
                        <Label>
                            <TextBlock Text="Min">
                            </TextBlock>
                        </Label>
                        <Appearance>
                            <FillStyle MainColor="Pink">
                            </FillStyle>
                        </Appearance>
                    </telerik:ChartMarkedZone>
                    <telerik:ChartMarkedZone meta:resourcekey="ChartMarkedZoneResource2" 
                        ValueEndY="105" ValueStartY="100">
                        <Label>
                            <TextBlock Text="Max">
                            </TextBlock>
                        </Label>
                        <Appearance>
                            <FillStyle MainColor="LightGreen">
                            </FillStyle>
                        </Appearance>
                    </telerik:ChartMarkedZone>
                </MarkedZones>
                <EmptySeriesMessage>
                    <TextBlock Text="Please, select item" ></TextBlock>
                </EmptySeriesMessage>
                <XAxis>
                <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134">
                    
                    <MajorGridLines Color="196, 196, 196" Width="0" />
                    <TextAppearance TextProperties-Color="89, 89, 89">
                    </TextAppearance>
                    
                </Appearance>
                    
                    <AxisLabel>
                        <Appearance Dimensions-Paddings="1px, 1px, 10%, 1px">
                        </Appearance>
                        <TextBlock>
                            <Appearance TextProperties-Color="51, 51, 51">
                            </Appearance>
                        </TextBlock>
                    </AxisLabel>
                </XAxis>
                <YAxis MinValue="-5" MaxValue="105" AutoScale="False" Step="5" LabelStep="10">
                    <Appearance Color="134, 134, 134" MajorTick-Color="196, 196, 196" 
                        MinorTick-Color="196, 196, 196">
                        <MajorGridLines Color="196, 196, 196" Visible="False" />
                        <MinorGridLines Color="196, 196, 196" Width="0" Visible="False" />
                        <TextAppearance TextProperties-Color="89, 89, 89">
                        </TextAppearance>
                    </Appearance>
                    <AxisLabel>
                        <TextBlock>
                            <Appearance TextProperties-Color="220, 158, 119">
                            </Appearance>
                        </TextBlock>
                    </AxisLabel>
<Items>
<telerik:ChartAxisItem Value="-5" meta:resourcekey="ChartAxisItemResource1"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="-4" meta:resourcekey="ChartAxisItemResource2"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="-3" meta:resourcekey="ChartAxisItemResource3"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="-2" meta:resourcekey="ChartAxisItemResource4"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="-1" meta:resourcekey="ChartAxisItemResource5"></telerik:ChartAxisItem>
<telerik:ChartAxisItem meta:resourcekey="ChartAxisItemResource6"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="1" meta:resourcekey="ChartAxisItemResource7"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="2" meta:resourcekey="ChartAxisItemResource8"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="3" meta:resourcekey="ChartAxisItemResource9"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="4" meta:resourcekey="ChartAxisItemResource10"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="5" meta:resourcekey="ChartAxisItemResource11"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="6" meta:resourcekey="ChartAxisItemResource12"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="7" meta:resourcekey="ChartAxisItemResource13"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="8" meta:resourcekey="ChartAxisItemResource14"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="9" meta:resourcekey="ChartAxisItemResource15"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="10" meta:resourcekey="ChartAxisItemResource16"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="11" meta:resourcekey="ChartAxisItemResource17"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="12" meta:resourcekey="ChartAxisItemResource18"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="13" meta:resourcekey="ChartAxisItemResource19"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="14" meta:resourcekey="ChartAxisItemResource20"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="15" meta:resourcekey="ChartAxisItemResource21"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="16" meta:resourcekey="ChartAxisItemResource22"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="17" meta:resourcekey="ChartAxisItemResource23"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="18" meta:resourcekey="ChartAxisItemResource24"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="19" meta:resourcekey="ChartAxisItemResource25"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="20" meta:resourcekey="ChartAxisItemResource26"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="21" meta:resourcekey="ChartAxisItemResource27"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="22" meta:resourcekey="ChartAxisItemResource28"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="23" meta:resourcekey="ChartAxisItemResource29"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="24" meta:resourcekey="ChartAxisItemResource30"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="25" meta:resourcekey="ChartAxisItemResource31"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="26" meta:resourcekey="ChartAxisItemResource32"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="27" meta:resourcekey="ChartAxisItemResource33"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="28" meta:resourcekey="ChartAxisItemResource34"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="29" meta:resourcekey="ChartAxisItemResource35"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="30" meta:resourcekey="ChartAxisItemResource36"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="31" meta:resourcekey="ChartAxisItemResource37"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="32" meta:resourcekey="ChartAxisItemResource38"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="33" meta:resourcekey="ChartAxisItemResource39"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="34" meta:resourcekey="ChartAxisItemResource40"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="35" meta:resourcekey="ChartAxisItemResource41"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="36" meta:resourcekey="ChartAxisItemResource42"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="37" meta:resourcekey="ChartAxisItemResource43"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="38" meta:resourcekey="ChartAxisItemResource44"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="39" meta:resourcekey="ChartAxisItemResource45"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="40" meta:resourcekey="ChartAxisItemResource46"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="41" meta:resourcekey="ChartAxisItemResource47"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="42" meta:resourcekey="ChartAxisItemResource48"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="43" meta:resourcekey="ChartAxisItemResource49"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="44" meta:resourcekey="ChartAxisItemResource50"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="45" meta:resourcekey="ChartAxisItemResource51"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="46" meta:resourcekey="ChartAxisItemResource52"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="47" meta:resourcekey="ChartAxisItemResource53"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="48" meta:resourcekey="ChartAxisItemResource54"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="49" meta:resourcekey="ChartAxisItemResource55"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="50" meta:resourcekey="ChartAxisItemResource56"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="51" meta:resourcekey="ChartAxisItemResource57"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="52" meta:resourcekey="ChartAxisItemResource58"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="53" meta:resourcekey="ChartAxisItemResource59"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="54" meta:resourcekey="ChartAxisItemResource60"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="55" meta:resourcekey="ChartAxisItemResource61"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="56" meta:resourcekey="ChartAxisItemResource62"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="57" meta:resourcekey="ChartAxisItemResource63"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="58" meta:resourcekey="ChartAxisItemResource64"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="59" meta:resourcekey="ChartAxisItemResource65"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="60" meta:resourcekey="ChartAxisItemResource66"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="61" meta:resourcekey="ChartAxisItemResource67"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="62" meta:resourcekey="ChartAxisItemResource68"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="63" meta:resourcekey="ChartAxisItemResource69"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="64" meta:resourcekey="ChartAxisItemResource70"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="65" meta:resourcekey="ChartAxisItemResource71"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="66" meta:resourcekey="ChartAxisItemResource72"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="67" meta:resourcekey="ChartAxisItemResource73"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="68" meta:resourcekey="ChartAxisItemResource74"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="69" meta:resourcekey="ChartAxisItemResource75"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="70" meta:resourcekey="ChartAxisItemResource76"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="71" meta:resourcekey="ChartAxisItemResource77"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="72" meta:resourcekey="ChartAxisItemResource78"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="73" meta:resourcekey="ChartAxisItemResource79"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="74" meta:resourcekey="ChartAxisItemResource80"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="75" meta:resourcekey="ChartAxisItemResource81"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="76" meta:resourcekey="ChartAxisItemResource82"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="77" meta:resourcekey="ChartAxisItemResource83"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="78" meta:resourcekey="ChartAxisItemResource84"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="79" meta:resourcekey="ChartAxisItemResource85"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="80" meta:resourcekey="ChartAxisItemResource86"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="81" meta:resourcekey="ChartAxisItemResource87"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="82" meta:resourcekey="ChartAxisItemResource88"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="83" meta:resourcekey="ChartAxisItemResource89"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="84" meta:resourcekey="ChartAxisItemResource90"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="85" meta:resourcekey="ChartAxisItemResource91"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="86" meta:resourcekey="ChartAxisItemResource92"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="87" meta:resourcekey="ChartAxisItemResource93"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="88" meta:resourcekey="ChartAxisItemResource94"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="89" meta:resourcekey="ChartAxisItemResource95"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="90" meta:resourcekey="ChartAxisItemResource96"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="91" meta:resourcekey="ChartAxisItemResource97"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="92" meta:resourcekey="ChartAxisItemResource98"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="93" meta:resourcekey="ChartAxisItemResource99"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="94" meta:resourcekey="ChartAxisItemResource100"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="95" meta:resourcekey="ChartAxisItemResource101"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="96" meta:resourcekey="ChartAxisItemResource102"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="97" meta:resourcekey="ChartAxisItemResource103"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="98" meta:resourcekey="ChartAxisItemResource104"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="99" meta:resourcekey="ChartAxisItemResource105"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="100" meta:resourcekey="ChartAxisItemResource106"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="101" meta:resourcekey="ChartAxisItemResource107"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="102" meta:resourcekey="ChartAxisItemResource108"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="103" meta:resourcekey="ChartAxisItemResource109"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="104" meta:resourcekey="ChartAxisItemResource110"></telerik:ChartAxisItem>
<telerik:ChartAxisItem Value="105" meta:resourcekey="ChartAxisItemResource111"></telerik:ChartAxisItem>
</Items>
                </YAxis>
                <Appearance Dimensions-Margins="19%, 90px, 12%, 9%">
                    <FillStyle MainColor="Transparent" SecondColor="Transparent">
                    </FillStyle>
                    <Border Color="WhiteSmoke" />
                </Appearance>
            </PlotArea>
            <ChartTitle>
                <Appearance Dimensions-Margins="3%, 1px, 1px, 6%">
                    <FillStyle MainColor="">
                    </FillStyle>
                </Appearance>
                <TextBlock Text="Progress">
                    <Appearance TextProperties-Color="86, 88, 89" 
                        TextProperties-Font="Verdana, 22px">
                    </Appearance>
                </TextBlock>
            </ChartTitle>
        </telerik:RadChart>
        
    </div>
    <br />
    <asp:Panel ID="PanelWarning" runat="server" Visible="False" 
        meta:resourcekey="PanelWarningResource1">
        <asp:Label ID="LabelWeightsWarning" runat="server" 
            meta:resourcekey="LabelWeightsWarningResource1" ></asp:Label>
        <telerik:RadButton ID="RadButtonAssignWeights" runat="server" Text="Assign Weights Evently"
        OnClick="RadButtonAssignWeights_Click" 
            meta:resourcekey="RadButtonAssignWeightsResource1">
        </telerik:RadButton>
    </asp:Panel>
    <br />
    <div>
    <telerik:RadTreeList ID="RadTreeList1" runat="server" OnNeedDataSource="RadTreeList1_NeedDataSource"
        ParentDataKeyNames="ParentID" DataKeyNames="ID" 
        AutoGenerateColumns="False" AllowSorting="True" 
        onitemdatabound="RadTreeList1_ItemDataBound" onitemcommand="RadTreeList1_ItemCommand"         
        Width="100%" EditMode="PopUp" onupdatecommand="RadTreeList1_UpdateCommand" 
            AllowMultiItemEdit="False" Culture="(Default)" IsItemInserted="False" meta:resourcekey="RadTreeList1Resource1"
        >
        
       <EditFormSettings EditFormType="Template" >
           <FormTemplate>
               <table>
                   <tr>
                       <td>
                           <asp:HiddenField ID="HiddenFieldKPIID" runat="server" 
                               Value='<%# Eval("OrigID") %>' />
                           <asp:Label ID="LabelName" runat="server" meta:resourcekey="LabelNameResource1" 
                               Text="Name"></asp:Label>
                       </td>
                       <td colspan="5">
                           <asp:Label ID="LabelCurrentName" runat="server" 
                               meta:resourcekey="LabelCurrentNameResource1" Text='<%# Eval("Name") %>'></asp:Label>
                       </td>
                   </tr>
                   <tr>
                       <td>
                           <asp:Label ID="LabelDescription" runat="server" 
                               meta:resourcekey="LabelDescriptionResource1" Text="Description"></asp:Label>
                       </td>
                       <td colspan="6">
                           <asp:Label ID="LabelCurrentDescription" runat="server" 
                               meta:resourcekey="LabelCurrentDescriptionResource1" 
                               Text='<%# Eval("Description") %>'></asp:Label>
                       </td>
                   </tr>
                   <tr>
                       <td>
                           <asp:Label ID="LabelTargetPerspective" runat="server" 
                               meta:resourcekey="LabelTargetPerspectiveResource1" Text="Perspective"></asp:Label>
                       </td>
                       <td colspan="6">
                       </td>
                   </tr>
                   <tr>
                       <td>
                           <asp:Label ID="Label1" runat="server" meta:resourcekey="Label1Resource1" 
                               Text="Measure"></asp:Label>
                       </td>
                       <td colspan="6">
                       </td>
                   </tr>
               </table>
               <table>
                   <tr>
                       <td>
                           <asp:Label ID="LabelWeight" runat="server" 
                               meta:resourcekey="LabelWeightResource1" Text="Weight"></asp:Label>
                       </td>
                       <td>
                           <telerik:RadNumericTextBox ID="RadNumericTextBoxWeight" runat="server" 
                               Culture="sk-SK" LabelCssClass="" MaxValue="100" 
                               meta:resourcekey="RadNumericTextBoxWeightResource1" MinValue="1" 
                               ShowSpinButtons="True" Value='<%# Int32.Parse(Eval("Weight").ToString()) %>' 
                               Width="40px">
                               <NumberFormat DecimalDigits="0" />
                           </telerik:RadNumericTextBox>
                           <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                               ControlToValidate="RadNumericTextBoxWeight" Display="None" 
                               ErrorMessage="Weight is mandatory" ForeColor="Red" 
                               meta:resourcekey="RequiredFieldValidator4Resource1" ValidationGroup="kpis"></asp:RequiredFieldValidator>
                       </td>
                       <td>
                           <asp:Label ID="LabelMin" runat="server" meta:resourcekey="LabelMinResource1" 
                               Text="<%$ Resources:Labels, Min %>"></asp:Label>
                       </td>
                       <td>
                           <telerik:RadNumericTextBox ID="RadNumericTextBoxMin" runat="server" 
                               Culture="sk-SK" LabelCssClass="" 
                               meta:resourcekey="RadNumericTextBoxMinResource1" ShowSpinButtons="True" 
                               Value='<%# Double.Parse(Eval("Min").ToString()) %>' Width="60px">
                           </telerik:RadNumericTextBox>
                       </td>
                       <td>
                           <asp:Label ID="LabelMax" runat="server" meta:resourcekey="LabelMaxResource1" 
                               Text="<%$ Resources:Labels, Max %>"></asp:Label>
                       </td>
                       <td>
                           <telerik:RadNumericTextBox ID="RadNumericTextBoxMax" runat="server" 
                               Culture="sk-SK" LabelCssClass="" 
                               meta:resourcekey="RadNumericTextBoxMaxResource1" ShowSpinButtons="True" 
                               Value='<%# Double.Parse(Eval("Max").ToString()) %>' Width="60px">
                           </telerik:RadNumericTextBox>
                       </td>
                   </tr>
                   <tr>
                       <td>
                           <asp:Label ID="LabelStartValue" runat="server" 
                               meta:resourcekey="LabelStartValueResource1" 
                               Text="<%$ Resources:Labels, StartValue %>"></asp:Label>
                       </td>
                       <td>
                           <telerik:RadNumericTextBox ID="RadNumericTextBoxStartValue" runat="server" 
                               Culture="sk-SK" LabelCssClass="" 
                               meta:resourcekey="RadNumericTextBoxStartValueResource1" ShowSpinButtons="True" 
                               Value='<%# Double.Parse(Eval("Start").ToString()) %>' Width="60px">
                           </telerik:RadNumericTextBox>
                           <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                               ControlToValidate="RadNumericTextBoxStartValue" Display="Dynamic" 
                               ErrorMessage="Start Value is mandatory" ForeColor="Red" 
                               meta:resourcekey="RequiredFieldValidator2Resource1" ValidationGroup="kpis"></asp:RequiredFieldValidator>
                       </td>
                       <td>
                           <asp:Label ID="LabelTargetValue" runat="server" 
                               meta:resourcekey="LabelTargetValueResource1" 
                               Text="<%$ Resources:Labels, TargetValue %>"></asp:Label>
                       </td>
                       <td>
                           <telerik:RadNumericTextBox ID="RadNumericTextBoxTargetValue" runat="server" 
                               Culture="sk-SK" LabelCssClass="" 
                               meta:resourcekey="RadNumericTextBoxTargetValueResource1" ShowSpinButtons="True" 
                               Value='<%# Double.Parse(Eval("Target").ToString()) %>' Width="60px">
                           </telerik:RadNumericTextBox>
                           <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                               ControlToValidate="RadNumericTextBoxTargetValue" Display="Dynamic" 
                               ErrorMessage="Target Value is mandatory" ForeColor="Red" 
                               meta:resourcekey="RequiredFieldValidator3Resource1" ValidationGroup="kpis"></asp:RequiredFieldValidator>
                       </td>
                       <td>
                           <asp:Label ID="LabelCurrentValue" runat="server" 
                               meta:resourcekey="LabelCurrentValueResource1" 
                               Text="<%$ Resources:Labels, CurrentValue %>"></asp:Label>
                       </td>
                       <td>
                           <telerik:RadNumericTextBox ID="RadNumericTextBoxCurrentValue" runat="server" 
                               BackColor="LightGreen" Culture="sk-SK" LabelCssClass="" 
                               meta:resourcekey="RadNumericTextBoxCurrentValueResource1" 
                               ShowSpinButtons="True" Value='<%# Double.Parse(Eval("Current").ToString()) %>' 
                               Width="60px">
                           </telerik:RadNumericTextBox>
                       </td>
                   </tr>
                   <tr>
                       <td>
                           <asp:CompareValidator ID="CompareValidatorMinMax" runat="server" 
                               ControlToCompare="RadNumericTextBoxMax" 
                               ControlToValidate="RadNumericTextBoxMin" Display="None" 
                               ErrorMessage="Min must be less than Max" ForeColor="Red" 
                               meta:resourcekey="CompareValidatorMinMaxResource1" Operator="NotEqual" 
                               ValidationGroup="kpis"></asp:CompareValidator>
                           <asp:CompareValidator ID="CompareValidatorStartTarget" runat="server" 
                               ControlToCompare="RadNumericTextBoxStartValue" 
                               ControlToValidate="RadNumericTextBoxTargetValue" Display="None" 
                               ErrorMessage="Start cannot be the same as Target" ForeColor="Red" 
                               meta:resourcekey="CompareValidatorStartTargetResource1" Operator="NotEqual" 
                               ValidationGroup="kpis"></asp:CompareValidator>
                       </td>
                   </tr>
               </table>
               <div style="float:left">
                   <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" 
                       meta:resourcekey="ValidationSummary1Resource1" ValidationGroup="kpis" />
               </div>
               <div style="float:right">
                   <table style="width: 100%">
                       <tr>
                           <td align="right">
                               <telerik:RadButton ID="Button1" runat="server" 
                                   CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' 
                                   meta:resourcekey="Button1Resource1" 
                                   Text='<%# (Container is GridEditFormInsertItem) ? GetGlobalResourceObject("Commands", "Insert").ToString()  : GetGlobalResourceObject("Commands", "Update").ToString() %>' 
                                   ValidationGroup="kpis">
                               </telerik:RadButton>
                               &nbsp;
                               <telerik:RadButton ID="Button2" runat="server" CausesValidation="False" 
                                   CommandName="Cancel" meta:resourcekey="Button2Resource1" 
                                   Text="<%$ Resources:Commands, Cancel %>">
                               </telerik:RadButton>
                           </td>
                       </tr>
                   </table>
               </div>
           </FormTemplate>
        <PopUpSettings Height="300px" />
        </EditFormSettings>

        <ValidationSettings CommandsToValidate="PerformInsert,Update" />
        <Columns>
            <telerik:TreeListTemplateColumn DataField="Name" HeaderText="Name" 
                meta:resourcekey="TreeListTemplateColumnResource1" UniqueName="Name">
                <ItemTemplate>
                    <asp:Image ID="img" runat="server" ImageUrl="~/Images/Symbols-Delete-icon.png" 
                        meta:resourcekey="imgResource1" />
                    <%# Eval("Name") %>
                </ItemTemplate>
                <HeaderStyle Width="250px" />
            </telerik:TreeListTemplateColumn>
            <telerik:TreeListBoundColumn DataField="Name" HeaderText="Name2" 
                meta:resourcekey="TreeListBoundColumnResource1" UniqueName="Name2" 
                Visible="False">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="Description" HeaderText="Description" 
                meta:resourcekey="TreeListBoundColumnResource2" UniqueName="Description" 
                Visible="False">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="Progress" HeaderText="Progress" 
                meta:resourcekey="TreeListBoundColumnResource3" UniqueName="Progress">
                <HeaderStyle Width="70px" />
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="Performance" HeaderText="Performance" 
                meta:resourcekey="TreeListBoundColumnResource4" UniqueName="Performance">
                <HeaderStyle Width="80px" />
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="Current" HeaderText="Current" 
                meta:resourcekey="TreeListBoundColumnResource5" UniqueName="Current">
                <HeaderStyle Width="60px" />
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="Start" HeaderText="Start" 
                meta:resourcekey="TreeListBoundColumnResource6" UniqueName="Start">
                <HeaderStyle Width="60px" />
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="Target" HeaderText="Target" 
                meta:resourcekey="TreeListBoundColumnResource7" UniqueName="Target">
                <HeaderStyle Width="60px" />
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="Weight" HeaderText="Weight" 
                meta:resourcekey="TreeListBoundColumnResource8" UniqueName="Weight">
                <HeaderStyle Width="60px" />
                <ItemStyle HorizontalAlign="Center" />
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="Min" HeaderText="Min" 
                meta:resourcekey="TreeListBoundColumnResource9" UniqueName="Min">
                <HeaderStyle Width="35px" />
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="Max" HeaderText="Max" 
                meta:resourcekey="TreeListBoundColumnResource10" UniqueName="Max">
                <HeaderStyle Width="35px" />
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="OrigID" HeaderText="ID" 
                meta:resourcekey="TreeListBoundColumnResource11" UniqueName="ID" 
                Visible="False">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListBoundColumn DataField="ItemType" HeaderText="ItemType" 
                meta:resourcekey="TreeListBoundColumnResource12" UniqueName="ItemType" 
                Visible="False">
            </telerik:TreeListBoundColumn>
            <telerik:TreeListButtonColumn CommandName="Select" 
                meta:resourcekey="TreeListButtonColumnResource1" Text="Show" 
                UniqueName="Select">
            </telerik:TreeListButtonColumn>
            <telerik:TreeListButtonColumn CommandName="Edit" 
                meta:resourcekey="TreeListButtonColumnResource2" Text="Edit" UniqueName="Edit">
            </telerik:TreeListButtonColumn>
        </Columns>

    </telerik:RadTreeList>
    </div>
    

    <div style="left:8px">
            <telerik:RadCalendar ID="RadCalendar1" runat="server" SelectedDate='<%# DateTime.Today %>'
                onselectionchanged="RadCalendar1_SelectionChanged" AutoPostBack="True" 
                 EnableMultiSelect="False" ViewSelectorText="x"
                 OnDayRender="Calendar1_DayRender" CultureInfo="sk-SK" 
                meta:resourcekey="RadCalendar1Resource1">
                 
            </telerik:RadCalendar>

        </div>
    <bsc:DetailsKPI ID="DKPI" runat="server" Visible="False"/>

   <bsc:KPIProgressDetails ID="KPIPD" runat="server" Visible="False" ></bsc:KPIProgressDetails>

   <br /><br /><br /><br /><br /><br /><br /><br />
    
</telerik:RadAjaxPanel>
    
<%--<asp:EntityDataSource ID="EntityDataSourceKPIs" runat="server" 
        ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
        EnableFlattening="False" EntitySetName="KPIs">
    </asp:EntityDataSource>--%>
</asp:Content>
